<template>
  <div class="Asset">
    <el-container>
      <el-aside style="width:220px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          background-color="#323232"
          text-color="#eee"
          active-text-color="#ff9900"
        >
          <!-- <el-col :span="24"> -->
            <el-submenu index="1">
              <template slot="title">
                <span>新增</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="1-1" >
                  <router-link to="/AssetAdd">资产新增</router-link>
                </el-menu-item>
                <el-menu-item index="1-2">
                  <router-link to="/CustomModule">自定义模块</router-link>
                </el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-menu-item index="2">
              <span slot="title">
                <router-link to="/AssetList">资产列表</router-link>
              </span>
            </el-menu-item>
            <el-menu-item index="3">
              <span slot="title">
                <router-link to="/AssetNowAdd">最近新增</router-link>
              </span>
            </el-menu-item>
          <!-- </el-col> -->
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </div>
</template>
<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>
<style lang="scss" scoped>
.el-menu {
  width: 220px;
  height: 100%;
  border: none;
  // background-color: #323232;
  /* :hover {
    background-color: #ff9900;
  } */
}
.el-container {
  background-color: #f3f6fb;
  .el-main {
    background-color: #fff;
  }
}
span {
  color: #eee;
}
</style>

